Learning Libgdx Game Development by 2013

Learning Libgdx Game Development by 2013

Author:2013
Language: eng
Format: epub
Publisher: Packt Publishing


The player character will now lose extra lives when falling down into the water. You can verify this by checking the top-right corner of the game screen. Each missing extra life will turn into a transparent bunny head icon. The game over delay and the restart of the game after that are also working now.

There is still one small modification needed to fix the camera follow behavior.

Change the update() method of CameraHelper as follows:

public void update (float deltaTime) { if (!hasTarget()) return; position.x = target.position.x + target.origin.x; position.y = target.position.y + target.origin.y; // Prevent camera from moving down too far position.y = Math.max(-1f, position.y); }



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.